package com.wyc.apiPassenger.controller;


import com.wyc.apiPassenger.service.TokenService;
import com.wyc.internalCommon.response.TokenResponse;
import com.wyc.internalCommon.result.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TokenController {

    @Autowired
    private TokenService tokenService;

    /**
     * 双token刷新token
     * @param tokenResponse
     * @return
     */
    @PostMapping("/token-refresh")
    public ApiResult refreshToken(@RequestBody TokenResponse tokenResponse){
        return tokenService.refreshToken(tokenResponse);
    }

}
